const express = require('express');
const router = express.Router();
import multer from 'multer';
import { avatar } from '@controllers/upload'

//处理头像文件
import { filedispose } from '@utils/middleware'
router.use(multer({dest:'files/avatar/'}).single('file'))
router.use(filedispose)

router.post('/avatar',avatar)

module.exports = router